#!/bin/bash

# ----------------------------------------------------------------------
# Filename:   75579-yum-clean.sh
# Version:    1.0
# Date:       2013/12/03
# Author:     yuanhui.shi
# Email:      yuanhui.shi@cs2c.com.cn
# Summary:    02系统基本功能-07开发环境-02开发工具-06yum包管理-07通过yum操作清除暂存信息
# Notes:      yum命令
# Copyright:  China Standard Software Co., Ltd.
# History：     
#             Version 1.0, 2013/12/03
#             -   The first one
# ----------------------------------------------------------------------

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

source ../../lib/Echo.sh

source ../../lib/XmlParse.sh


function CleanData ()
{
  EchoInfo "75579-yum-clean.sh执行完毕"
}

trap "CleanData" EXIT INT

#清除暂存的rpm包文件
yum clean packages &>/dev/null
EchoResult "清除暂存中rpm包文件"

#清除暂存中旧的rpm头文件
yum clean headers &>/dev/null
EchoResult "清除暂存中rpm头文件"

#清除暂存中旧的rpm头文件和包文件
yum clean all &>/dev/null
EchoResult "清除暂存中旧的rpm头文件和包文件"
